#!/bin/bash
url=registry.cn-hangzhou.aliyuncs.com/kubernetes2
version=v1.16.4
images=(`kubeadm config images list --kubernetes-version=$version|awk -F '/' '{print $2}'`)
for imagename in ${images[@]} ; do
  docker pull $url/$imagename
  docker tag $url/$imagename k8s.gcr.io/$imagename
  docker rmi -f $url/$imagename
done

#flannel
docker pull $url/flannel:v0.11.0-amd64
docker tag $url/flannel:v0.11.0-amd64  quay.io/coreos/flannel:v0.11.0-amd64 

#metric
docker pull kubernetesui/metrics-scraper:v1.0.1

#dashboard
docker pull kubernetesui/dashboard:v2.0.0-beta8

#ingress-nginx
docker pull registry.aliyuncs.com/google_containers/nginx-ingress-controller:0.26.1
#docker pull registry.cn-hangzhou.aliyuncs.com/kubernetes2/ingress-controller:0.28.0
#docker tag registry.cn-hangzhou.aliyuncs.com/kubernetes2/ingress-controller:0.28.0 quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0
#docker rmi registry.cn-hangzhou.aliyuncs.com/kubernetes2/ingress-controller:0.28.0

#nfs
docker pull quay.io/external_storage/nfs-client-provisioner:latest
